#include "Gauss2D2X2P.h"
#include <cmath>

using SG::DataStructure::Common::Real;
using namespace SG::FEMSolver::Element;

std::size_t SG::FEMSolver::Element::Gauss2D2X2P::nPoint = 4;

Gauss2D2X2P::Gauss2D2X2P ()
:integPointSet (nPoint)
{
    const Real xi{sqrt (3.0) / 3.0};
    integPointSet[0].m_x      = -xi;
    integPointSet[0].m_y      = -xi;
    integPointSet[0].m_z      = 0.0;
    integPointSet[0].m_weight = 1.0;

    integPointSet[1].m_x      = xi;
    integPointSet[1].m_y      = -xi;
    integPointSet[1].m_z      = 0.0;
    integPointSet[1].m_weight = 1.0;

    integPointSet[2].m_x      = xi;
    integPointSet[2].m_y      = xi;
    integPointSet[2].m_z      = 0.0;
    integPointSet[2].m_weight = 1.0;

    integPointSet[3].m_x      = -xi;
    integPointSet[3].m_y      = xi;
    integPointSet[3].m_z      = 0.0;
    integPointSet[3].m_weight = 1.0;
}

